#pragma once
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string>


class InetAddress
{
    
private:
    struct sockaddr_in _addr;
public:

    InetAddress(const std::string &ip,unsigned short port);
    InetAddress(const struct sockaddr_in &addr);
    ~InetAddress();
    std::string ip();
    unsigned short port();
    struct sockaddr_in *getSockAddrPtr();
    std::string to_string();
};



